package Keyword.StaticDemo;


public class OuterClass {
    private int test = 10;
    class InnerClass {
        public int x = 1;
        public int y = 2;

        public void showTest() {
            System.out.println(test);
        }
    }

    static class StaticInnerClass {
        public int x1 = 4;
        public int y1 = 5;
    }

    public static void main(String[] args) {
//         InnerClass innerClass = new InnerClass(); // 'OuterClass.this' cannot be referenced from a static context
        OuterClass outerClass = new OuterClass();
        InnerClass innerClass = outerClass.new InnerClass();
//        System.out.println(innerClass.test);
        innerClass.showTest();
        StaticInnerClass staticInnerClass = new StaticInnerClass();
        System.out.println(staticInnerClass.x1);
    }
}
